package cn.buk.tms.dao;

import cn.buk.common.sc.CommonSearchCriteria;
import cn.buk.tms.entity.misc.Product;
import cn.buk.tms.entity.misc.TieInProduct;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: yfdai
 * Date: 14-4-17
 * Time: 下午11:03
 * To change this template use File | Settings | File Templates.
 * @author yfdai
 */
public interface ProductDao {

    int create(Product product);

    List<Product> findAll();

    Product getById(int id);

    Product getByCode(String code);

    int createTieInProduct(TieInProduct p);

    List<TieInProduct> getAllTieInProducts(int enterpriseId);

    List<TieInProduct> searchTieInProducts(int enterpriseId, CommonSearchCriteria sc);

    int deleteTieInProduct(int enterpriseId, int id);

    TieInProduct getTieInProductById(int id);

    TieInProduct getTieInProductByCode(int enterpriseId, String productCode);
}
